package meihua.stopcarapp.ui.fragment;

import android.graphics.Color;
import android.os.Handler;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.widget.RecyclerView;
import android.widget.ListView;

import java.util.List;

import butterknife.Bind;
import meihua.mylibrary.base.BaseFragment;
import meihua.mylibrary.refreshrecyclerview.RefreshRecyclerView;
import meihua.mylibrary.refreshrecyclerview.adapter.RecyclerAdapter;
import meihua.stopcarapp.R;
import meihua.stopcarapp.app.UserConfig;
import meihua.stopcarapp.bean.SpendEntity;
import meihua.stopcarapp.model.SpendModel;
import meihua.stopcarapp.presenter.SpendPresenter;
import meihua.stopcarapp.presenter.contract.SpendContract;
import meihua.stopcarapp.utils.ToastUtil;

/**
 * Name: LGZ
 * Time: 2017/5/18.
 * Dec:
 * 消费明细
 */

public class SpendFragment extends BaseFragment<SpendPresenter,SpendModel> implements SpendContract.View {

    @Bind(R.id.my_wallet_detail_recycler)
    RefreshRecyclerView fragmentMyWalletList;

    private CardRecordAdapter mAdapter;
    private Handler mHandler;
    private int page = 1;


    @Override
    protected int getLayoutResource() {
        return R.layout.fragment_my_wallet_detail;
    }

    @Override
    public void initPresenter() {
        mPresenter.setVM(this,mModel);
    }

    @Override
    protected void initView() {
//        mPresenter.getSpendListRequest(UserConfig.USER_ENTITY.getUser_id(),"1");
    }

    @Override
    public void showLoading(String title) {

    }

    @Override
    public void stopLoading() {

    }

    @Override
    public void showErrorTip(String msg) {

    }

    @Override
    public void returnSpendList(List<SpendEntity> spends) {
        ToastUtil.showShort(getContext(),spends.size()+"");
    }
}
